<template name="Header">
	<view class="header">
		<view class="header-box">
			<image class="logo" src="../../static/logo.png" @tap="goHome()"></image>
			<view @tap="showMenu()">
				<text class="menu-icon" :class="this.$store.state.ifShowMenu?'cuIcon-close':'cuIcon-sort'"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"Header",
		data() {
			return {
				
			}
		},
		methods: {
			showMenu(){
				this.$store.commit('SHOWMENU', !this.$store.state.ifShowMenu);
			},
			closeMenu(){
				this.$store.commit('SHOWMENU', false);
			},
			goHome(){
				this.closeMenu();
				uni.navigateTo({
					url: '../../pages/index/index'
				})
			}
		}
	}
</script>

<style>
	@import url("./index.css");
</style>
